<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>编辑产品 HDSysCms</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="stylesheet" href="<?php echo getcdnurlhost() ?>/admin/layui/css/layui.css" media="all">
<link rel="stylesheet" href="<?php echo getcdnurlhost() ?>/admin/style/admin.css" media="all">
<link rel="stylesheet" href="<?php echo getcdnurlhost() ?>/admin/layui_ext/dtree/dtree.css">
<link rel="stylesheet" href="<?php echo getcdnurlhost() ?>/admin/layui_ext/dtree/font/dtreefont.css">
<link rel="stylesheet" href="<?php echo getcdnurlhost() ?>/markdown/css/editormd.min.css" />
</head>
<body data="HDSYSCMS 2021本系统受国家版权局保护请勿破解或者二次开发传播">
<div class="layui-fluid">
<div style="display: flex;" class="layui-row layui-col-space15">
<div class="layui-col-md2">
<div style="  width: 230px;  overflow: hidden;" class="layui-card">
<div class="layui-card-header">分配到栏目 <i onclick="show_content('{$data.pid}','')" class="code-show layui-icon layui-icon-tips"></i></div>
<div class="layui-input-inline" style="width: 400px;">
<ul id="seltree" class="dtree" data-id="0"></ul>
</div>
</div>
</div>
<div class="layui-col-md10">
<div style="min-width: max-content;width: 100%;" class="layui-card">
<form onsubmit="return false;" class="layui-form" action="">
<div class="layui-tab layui-tab-brief" lay-filter="component-tabs-hash">
<ul class="layui-tab-title">
<li class="layui-this" lay-id="11">编辑产品</li>
<li class=" en-hide" lay-id="22">编辑产品(英)</li>
</ul>
<div class="layui-tab-content">
<div class="layui-tab-item layui-show">
<input type="hidden" name="id" value="<?php echo $param_db_array_value['id'] ?>" class="layui-input">
<div style="display: none;" class="layui-form-item hdsys-content hdsys-jmp">
<label class="layui-form-label">跳转地址 <i onclick="show_content('{$data.url}','')" class="code-show layui-icon layui-icon-tips"></i></label>
<div class="layui-input-inline" style="width: 100%;max-width:700px;">
<input type="text" name="url" value="<?php echo $param_db_array_value['url'] ?>" placeholder="https://www.hdsyscms.com/" class="layui-input">
</div>
<div class="layui-form-mid layui-word-aux"></div>
</div>
<div class="layui-form-item ">
<label class="layui-form-label">内容标题 <i onclick="show_content('{$data.name}','')" class="code-show layui-icon layui-icon-tips"></i></label>
<div class="layui-input-inline" style="width: 100%;max-width:700px;">
<input type="text" name="name" value="<?php echo $param_db_array_value['name'] ?>" placeholder="产品标题" autocomplete="off" class="layui-input">
</div>
<div class="layui-form-mid layui-word-aux">*必填</div>
</div>
<?php
if (bs_lib::get_configs_value('personality', 'die')==1) {
$param_db_array_value['content']=htmlspecialchars_decode($param_db_array_value['markdown']=='' ? $param_db_array_value['content'] : $param_db_array_value['markdown']);
echo '<div  class="layui-form-item page">
<label class="layui-form-label">内容 <i onclick="show_content(\'{$data.content}\',\'\')" class="code-show layui-icon layui-icon-tips"></i></label>
<div class="layui-input-inline" style="width:calc(100% - 230px);;min-width:500px">
<div   id="content-editormd" style="width:100%;z-index: 99;">
<textarea  >' . $param_db_array_value['content'] . '</textarea>
</div>
</div>
<div class="layui-form-mid layui-word-aux"></div>
</div>';
} else {
echo '<div  class="layui-form-item page">
<label class="layui-form-label ">内容 <i onclick="show_content(\'{$data.content}\',\'\')" class="code-show layui-icon layui-icon-tips"></i></label>
<div class="layui-input-inline">
<textarea id="content" name="content" style="width:700px;;height: 350px;">' . $param_db_array_value['content'] . '</textarea>
</div>
<div class="layui-form-mid layui-word-aux"></div>
</div>';
} ?>
<div class="layui-form-item hdsys-content">
<label class="layui-form-label">添加时间 <i onclick="show_content('{$data.addtime}','{@date(\'Y-m-d H:i:s\',$data.addtime)}')" class="code-show layui-icon layui-icon-tips"></i></label>
<div style="width: 270px;" class="layui-input-inline">
<input type="text" name="addtime" id="addtime" value="<?php echo $param_db_array_value['add_time']==0 ? date('Y-m-d H:i:s') : date('Y-m-d H:i:s', $param_db_array_value['add_time']); ?>" placeholder="添加时间" autocomplete="off" class="layui-input">
</div>
<label style="width: 60px;" class="layui-form-label hdsys-content">链接 <i onclick="show_content('{$data.static_url}','{@jmp($data.static_url)}')" class="code-show layui-icon layui-icon-tips"></i></label>
<div style="width: 335px;" class="layui-input-inline hdsys-content">
<input type="text" name="static_url" value="<?php echo $param_db_array_value['static_url'] ?>" placeholder="news-1-22" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">视图模版 <i onclick="show_content('{$data.template}','')" class="code-show layui-icon layui-icon-tips"></i></label>
<div style="width: 270px;" class="layui-input-inline">
<select name="template" id="template" lay-filter="template" lay-verify="required">
<option value="">请选择视图模版</option>
<?php
echo $param_templates ?>
<option value="jmp">跳转连接</option>
</select>
</div>
<div class="layui-form-mid layui-word-aux">*</div>
</div>
<div style="padding-left: 50px;display: none;width: 100%;max-width: 900px;" class="layui-form-item safeparam-zh">
<div style="widthx: max-content;" class="layui-tab layui-tab-card">
<ul class="layui-tab-title layui-tab-title-zh">
</ul>
<div class="layui-tab-content layui-tab-content-zh">
</div>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">缩略主图 <i onclick="show_content('{$data.graph}','')" class="code-show layui-icon layui-icon-tips"></i></label>
<div class="layui-input-inline" style="width: auto;">
<div class="layui-upload">
<blockquote class="layui-elem-quote layui-quote-nm" style="margin-top: 10px;">
<input type="hidden" value="<?php echo $param_db_array_value['graph'] ?>" id="graph" name="graph" />
<div style="display: flex;" class="layui-upload-list" id="simges-graph-img-list">
<?php if ($param_db_array_value['graph'] !='') {  ?>
<div class="hdsys—upload-img-div imgdel">
<img src="<?php echo $param_db_array_value['graph'] ?>" data-url="../<?php echo $param_db_array_value['graph'] ?>" class="hdsys—upload-img"> <i class="layui-icon delete">&#xe640;</i>
</div>
<?php } ?>
</div>
</blockquote>
</div>
</div>
<div class="layui-form-mid layui-word-aux"><button type="button" class="layui-btn layui-btn-primary layui-btn-sm button-simges-graph" id="simges-graph-bin">选择图片</button> </div>
<label class="layui-form-label">产品图集 <i onclick="show_content('{$data.album}','')" class="code-show layui-icon layui-icon-tips"></i></label>
<div class="layui-input-inline" style="width: auto;">
<div class="layui-upload">
<blockquote class="layui-elem-quote layui-quote-nm" style="margin-top: 10px;">
<div style="display: flex;" class="layui-upload-list" id="simges-album-img-list">
<?php
$param_arr=call_my_explode('|', $param_db_array_value['album']);
foreach ($param_arr as  $param_value) {
if ($param_value !='') {
echo ' <div class="hdsys—upload-img-div imgdel"><img src="../' . $param_value . '" data-url="' . $param_value . '"    class="hdsys—upload-img album"> <i class="layui-icon delete">&#xe640;</i></div>';
}
}
?>
</div>
</blockquote>
</div>
</div>
<div class="layui-form-mid layui-word-aux"><button type="button" class="layui-btn layui-btn-primary layui-btn-sm button-simges-album" id="simges-album-bin">选择图片</button> </div>
</div>
<?php if ($param_db_array_value['seokeywords']=='' and $param_db_array_value['seodescription']=='' and $param_db_array_value['attribute1']=='' and $param_db_array_value['attribute2']=='' and $param_db_array_value['attribute3']=='' and $param_db_array_value['attribute4']=='') {; ?>
<div class="seo-show-bin layui-form-item jmp-hide">
<label class="layui-form-label"></label>
<a href="#" onclick="$('.seo-show-bin').hide();$('.seo-show').show();" class="seo-show-a layui-form-mid "><i class="code-show layui-icon layui-icon-addition"></i>显示更多属性</a>
</div>
<?php  }; ?>
<div <?php if ($param_db_array_value['seokeywords']=='' and $param_db_array_value['seodescription']=='' and $param_db_array_value['attribute1']=='' and $param_db_array_value['attribute2']=='' and $param_db_array_value['attribute3']=='' and $param_db_array_value['attribute4']=='') echo 'style="display: none;"'; ?> class="seo-show">
<div style="padding-left: 150px;display: none;" class="layui-form-item safeparam-en">
<div class="layui-tab layui-tab-card">
<ul class="layui-tab-title layui-tab-title-en">
</ul>
<div class="layui-tab-content layui-tab-content-en">
</div>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">SEO关键词 <i onclick="show_content('{$data.seokeywords}','')" class="code-show layui-icon layui-icon-tips"></i></label>
<div class="layui-input-inline" style="width: 400px;">
<input type="text" name="seokeywords" value="<?php echo $param_db_array_value['seokeywords'] ?>" placeholder="SEO关键词,号隔开不要过多" autocomplete="off" class="layui-input">
</div>
<div class="layui-form-mid layui-word-aux"></div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">SEO描述 <i onclick="show_content('{$data.seodescription}','')" class="code-show layui-icon layui-icon-tips"></i></label>
<div class="layui-input-inline">
<textarea style="width: 400px;height: 90px;" value="" name="seodescription" placeholder="SEO优化描述,200字符内" class="layui-input"><?php echo $param_db_array_value['seodescription'] ?></textarea>
</div>
<div class="layui-form-mid layui-word-aux"></div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">自定属性1 <i onclick="show_content('{$data.attribute1}','')" class="code-show layui-icon layui-icon-tips"></i></label>
<div class="layui-input-inline" style="width: 350px;">
<input type="text" name="attribute1" value="<?php echo $param_db_array_value['attribute1'] ?>" placeholder="宽:500cm" autocomplete="off" class="layui-input">
</div>
<div class="layui-form-mid layui-word-aux"></div>
<label class="layui-form-label">自定属性2 <i onclick="show_content('{$data.attribute2}','')" class="code-show layui-icon layui-icon-tips"></i></label>
<div class="layui-input-inline" style="width: 350px;">
<input type="text" name="attribute2" value="<?php echo $param_db_array_value['attribute2'] ?>" placeholder="宽:500cm" autocomplete="off" class="layui-input">
</div>
<div class="layui-form-mid layui-word-aux"></div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">自定属性3 <i onclick="show_content('{$data.attribute3}','')" class="code-show layui-icon layui-icon-tips"></i></label>
<div class="layui-input-inline" style="width: 350px;">
<input type="text" name="attribute3" value="<?php echo $param_db_array_value['attribute3'] ?>" placeholder="宽:500cm" autocomplete="off" class="layui-input">
</div>
<div class="layui-form-mid layui-word-aux"></div>
<label class="layui-form-label">自定属性4 <i onclick="show_content('{$data.attribute4}','')" class="code-show layui-icon layui-icon-tips"></i></label>
<div class="layui-input-inline" style="width: 350px;">
<input type="text" name="attribute4" value="<?php echo $param_db_array_value['attribute4'] ?>" placeholder="宽:500cm" autocomplete="off" class="layui-input">
</div>
<div class="layui-form-mid layui-word-aux"></div>
</div>
</div>
<div class="layui-form-item hdsys-content">
<label class="layui-form-label">是否可见 <i onclick="show_content('{$data.sdates}','')" class="code-show layui-icon layui-icon-tips"></i></label>
<div style="width: 100px;" class="layui-input-inline">
<select name="sdates" id="sdates" lay-filter="sdates">
<option value="0">可见</option>
<option value="1">隐藏</option>
</select>
</div>
<label style="width: 60px;" class="layui-form-label">推荐 <i onclick="show_content('{$data.hot}','')" class="code-show layui-icon layui-icon-tips"></i></label>
<div style="width: 100px;" class="layui-input-inline">
<select name="hot" id="hot" lay-filter="hot" lay-verify="required">
<option value="0">默认</option>
<option value="1">推荐一</option>
<option value="2">推荐二</option>
<option value="3">推荐三</option>
<option value="4">推荐四</option>
</select>
</div>
<label style="width: 60px;" class="layui-form-label">阅读 <i onclick="show_content('{$data.browse}','')" class="code-show layui-icon layui-icon-tips"></i></label>
<div style="width: 80px;" class="layui-input-inline">
<input type="text" name="browse" value="<?php echo $param_db_array_value['browse'] ?>" placeholder="阅读量" autocomplete="off" class="layui-input">
</div>
</div>
<style>.hdsys—upload-img {width: 60px;height: 60px;border-style: solid;border-color: #fff;border-width: 1px;}.hdsys—upload-img-div {width: 60px;height: 60px;margin: 0 10px 10px 0;}.delete:hover {color: firebrick;}.layui-elem-quote {padding: 10px;}</style>
<div class="layui-form-item">
<label class="layui-form-label"></label>
<div class="layui-input-block">
<button class="layui-btn" lay-submit lay-filter="post">保存编辑</button>
</div>
</div>
<div style="display:none;" id="simges-graph-bin-up"></div>
<div style="display:none;" id="simges-album-bin-up"></div>
</div>
<div class="layui-tab-item">
<div style="display: none;" class="layui-form-item hdsys-content hdsys-jmp">
<label class="layui-form-label en">跳转地址(英) <i onclick="show_content('{$data.eurl}','')" class="code-show layui-icon layui-icon-tips"></i></label>
<div class="layui-input-inline" style="width: 100%;max-width:700px;">
<input type="text" name="eurl" value="<?php echo $param_db_array_value['eurl'] ?>" placeholder="https://www.hdsyscms.com/" class="layui-input">
</div>
<div class="layui-form-mid layui-word-aux"></div>
</div>
<div class="layui-form-item">
<label class="layui-form-label en">内容标题(英) <i onclick="show_content('{$data.ename}','')" class="code-show layui-icon layui-icon-tips"></i></label>
<div class="layui-input-inline" style="width: 100%;max-width:700px;">
<input type="text" name="ename" value="<?php echo $param_db_array_value['ename'] ?>" placeholder="产品标题(英)" autocomplete="off" class="layui-input">
</div>
<div class="layui-form-mid layui-word-aux"></div>
</div>
<?php
if (bs_lib::get_configs_value('personality', 'die')==1) {
$param_db_array_value['econtent']=htmlspecialchars_decode($param_db_array_value['emarkdown']=='' ? $param_db_array_value['econtent'] : $param_db_array_value['emarkdown']);
echo '<div  class="layui-form-item page">
<label class="layui-form-label en">内容(英) <i onclick="show_content(\'{$data.econtent}\',\'\')" class="code-show layui-icon layui-icon-tips"></i></label>
<div class="layui-input-inline" style="width:calc(100% - 230px);min-width:500px">
<div   id="econtent-editormd" style="width:calc(100% - 230px);z-index: 99;">
<textarea >' . $param_db_array_value['econtent'] . '</textarea>
</div>
</div>
<div class="layui-form-mid layui-word-aux"></div>
</div>';
} else {
echo '<div class="layui-form-item page">
<label class="layui-form-label en">内容(英) <i onclick="show_content(\'{$data.econtent}\',\'\')" class="code-show layui-icon layui-icon-tips"></i></label>
<div class="layui-input-inline">
<textarea id="econtent" name="econtent" style="width:700px;height: 350px;">' . $param_db_array_value['econtent'] . '</textarea>
</div>
<div class="layui-form-mid layui-word-aux"></div>
</div>';
} ?>
<div style="padding-left: 50px;display: none;width: 100%;max-width: 900px;" class="layui-form-item safeparam-en">
<div style="widthx: max-content;" class="layui-tab layui-tab-card">
<ul class="layui-tab-title layui-tab-title-en">
</ul>
<div class="layui-tab-content layui-tab-content-en">
</div>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label en">SEO关键词(英) <i onclick="show_content('{$data.eseokeywords}','')" class="code-show layui-icon layui-icon-tips"></i></label>
<div class="layui-input-inline" style="width: 400px;">
<input type="text" name="eseokeywords" value="<?php echo $param_db_array_value['eseokeywords'] ?>" placeholder="SEO关键词(英),号隔开" autocomplete="off" class="layui-input">
</div>
<div class="layui-form-mid layui-word-aux"></div>
</div>
<div class="layui-form-item">
<label class="layui-form-label en">SEO描述(英) <i onclick="show_content('{$data.eseodescription}','')" class="code-show layui-icon layui-icon-tips"></i></label>
<div class="layui-input-inline">
<textarea style="width: 400px;height: 90px;" value="" name="eseodescription" placeholder="英文SEO优化描述" class="layui-input"><?php echo $param_db_array_value['eseodescription'] ?></textarea>
</div>
<div class="layui-form-mid layui-word-aux"></div>
</div>
<div class="layui-form-item">
<label class="layui-form-label en">自定属性1(英) <i onclick="show_content('{$data.eattribute1}','')" class="code-show layui-icon layui-icon-tips"></i></label>
<div class="layui-input-inline" style="width: 350px;">
<input type="text" name="eattribute1" value="<?php echo $param_db_array_value['eattribute1'] ?>" placeholder="宽:500cm" autocomplete="off" class="layui-input">
</div>
<div class="layui-form-mid layui-word-aux"></div>
<label class="layui-form-label en">自定属性2(英) <i onclick="show_content('{$data.eattribute2}','')" class="code-show layui-icon layui-icon-tips"></i></label>
<div class="layui-input-inline" style="width: 350px;">
<input type="text" name="eattribute2" value="<?php echo $param_db_array_value['eattribute2'] ?>" placeholder="宽:500cm" autocomplete="off" class="layui-input">
</div>
<div class="layui-form-mid layui-word-aux"></div>
</div>
<div class="layui-form-item">
<label class="layui-form-label en">自定属性3(英) <i onclick="show_content('{$data.eattribute3}','')" class="code-show layui-icon layui-icon-tips"></i></label>
<div class="layui-input-inline" style="width: 350px;">
<input type="text" name="eattribute3" value="<?php echo $param_db_array_value['eattribute3'] ?>" placeholder="宽:500cm" autocomplete="off" class="layui-input">
</div>
<div class="layui-form-mid layui-word-aux"></div>
<label class="layui-form-label en">自定属性4(英) <i onclick="show_content('{$data.eattribute4}','')" class="code-show layui-icon layui-icon-tips"></i></label>
<div class="layui-input-inline" style="width: 350px;">
<input type="text" name="eattribute4" value="<?php echo $param_db_array_value['eattribute4'] ?>" placeholder="宽:500cm" autocomplete="off" class="layui-input">
</div>
<div class="layui-form-mid layui-word-aux"></div>
</div>
<div class="layui-form-item">
<label class="layui-form-label"></label>
<div class="layui-input-block">
<button class="layui-btn" lay-submit lay-filter="post">保存编辑</button>
</div>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<style>.dtree-zdy-item-this {background-color: #deeefd00 !important;}.dtree-zdy-item:hover {background-color: #deeefd !important;}.dtree-zdy-item cite {font-size: 13px !important;}.dtree-zdy-item:hover cite {color: #1b84ed !important;}.dtree-zdy-dtreefont {font-size: 18px !important;}.dtree-zdy-ficon {color: #2F4056 !important;}.dtree-zdy-icon {color: #2F4056 !important;}.dtree-zdy-checkbox:hover {color: #2163cb !important;}.dtree-zdy-choose {color: #2163cb !important;}.dtree-nav-first-line,.dtree-nav-line,.dtree-nav-last-line {line-height: 40px;}.layui-tab-item-param .add-list {content: "\e624";font-size: 30px;border: 1px solid;border-radius: 30px;position: absolute;left: 45%;bottom: 0px;z-index: 12;width: 56px;text-align: center;}.layui-tab-item-param {position: relative;height: 100%;padding-bottom: 60px;}.layui-tab-item-param .add-list:hover {color: #2b83f9;}.hdsyscms-label {display: flex;float: left;margin-bottom: 10px;}.hdsyscms-label .layui-form-label {float: none;width: 100px;padding-left: 0px;font-size: 13px;}.layui-form-label {width: 110px;padding-left: 0px;overflow: hidden;float: flex;}.hdsys-form-box {border-bottom: 1px solid #ededed;}</style>
<div id="setimges-up"></div>
<?php adminechohtnl(); ?>
<div id="foot">Copyright © 2019-2023 <a href="https://www.HDSysCms.Com?pro" target="_blank">HDSysCms <?php echo HDSYS_VERSION; ?></a> <br>
All Rights Reserved </div>
<script src="<?php echo getcdnurlhost() ?>/jquery.min.js"></script>
<script src="<?php echo getcdnurlhost() ?>/admin/layui/layui.js"></script>
<script>var modeles=<?php echo json_decode($param_db_array_value['modules'])==false ? '{}' : $param_db_array_value['modules']; ?>;var emodeles=<?php echo json_decode($param_db_array_value['emodules'])==false ? '{}' : $param_db_array_value['emodules']; ?>;var modelesall={zh: {},en: {}};modelesall.zh=modeles;modelesall.en=emodeles;var html_begin='<div  class="hdsys-form-box layui-form-item">';window.form_input_html=function(josn, long='zh') {var html='';$(".safeparam-" + long).hide();$(".layui-tab-title-" + long).html('');$(".layui-tab-content-" + long).html('');var input_html='<div class="hdsyscms-label">' +' {_label_input}' +' <div class="layui-input-inline">' +' <input type="text" name="{_code}" placeholder="{_placeholder}" value="{_value}" class="layui-input {_class} hdsyscms-input" />' +' </div>' +' </div>';var bin_upfile='<div class="hdsyscms-label">' +' {_label_input}' +' <div  style="display: flex;    width: 299px;"  class="layui-input-inline">' +' <input type="text" name="{_code}" style="width: calc(100% - 65px);margin-right: 5px;" placeholder="{_placeholder}" value="{_value}" class="input_{div_id} {_class} layui-input  hdsyscms-input">' +' <a herf=""  data-id="{div_id}" class="button_{div_id} button-file layui-btn layui-btn-primary layui-border-blue">上传</a>' +' </div>' +' </div>';var bin_select='<div class="hdsyscms-label">' +' {_label_input}' +' <div class="layui-input-inline">' +'<select id="{_select_id}"  name="{_code}" class="{_class}  hdsyscms-input" lay-filter="select" >' +'{_bin_select}' +'</select>' +'{_js_html}' +' </div>' +' </div>';var bin_select_input='<div class="hdsyscms-label">' +' {_label_input}' +'<div class="layui-input-inline">' +'<input type="text" name="{_code}"    style="position:absolute;z-index:2;width:80%;" placeholder="{_placeholder}" lay-reqtext="" class="layui-input  {_class}  hdsyscms-input select-input" value="{_value}" autocomplete="off" />' +'<select    lay-filter="bin_select_input" class="bin_select_input" >' +'{_bin_select_input}' +'</select>' +' </div>' +' </div>';var html_end=' <div class="layui-form-mid layui-word-aux">{_mid_placeholder}</div>' +' </div>';var tmp_html='';var input_modules_html='';josn.forEach(function(josn_value, index) {if (index==0) {$(".layui-tab-title-" + long).append("<li class='layui-this' >" + josn_value.name + "</li>");} else {$(".layui-tab-title-" + long).append("<li >" + josn_value.name + "</li>");}tmp_html='';josn_value.modules.forEach(function(modules_value, m_index) {input_modules_html='';if (modules_value.type=='upfile') {input_modules_html=bin_upfile;} else if (modules_value.type=='select') {input_modules_html=bin_select;input_modules_html=input_modules_html.replaceAll('{_select_id}', "{select_" + modules_value.name + "}");input_modules_html=input_modules_html.replaceAll('{_js_html}', "{select_js_html_" + modules_value.name + "}");if (typeof modules_value.select !=='undefined' && modules_value.select.length > 0) {var se_html='';for (let index in modules_value.select) {for (let i in modules_value.select[index]) {se_html=se_html + '<option  value="' + i + '">' + modules_value.select[index][i] + '</option>';}};input_modules_html=input_modules_html.replaceAll('{_bin_select}', se_html);}} else {if (typeof modules_value.select !=='undefined' && modules_value.select.length > 0) {input_modules_html=bin_select_input;var se_html='';modules_value.select.forEach(function(modules_value, index) {se_html=se_html + '<option value="' + modules_value + '">' + modules_value + '</option>';});input_modules_html=input_modules_html.replaceAll('{_bin_select_input}', se_html);} else {input_modules_html=input_html;}}input_modules_html=input_modules_html.replaceAll('{div_id}', '');input_modules_html=input_modules_html.replaceAll('{_placeholder}', modules_value.placeholder);input_modules_html=input_modules_html.replaceAll('{_value}', "{mysafe_" + modules_value.name + "}");input_modules_html=input_modules_html.replaceAll('{_class}', modules_value.class=='undefined' ? '' : modules_value.class);input_modules_html=input_modules_html.replaceAll('{_code}', "hdsyscms_mysafe_" + modules_value.name);if (modules_value.label=='') {input_modules_html=input_modules_html.replaceAll('{_label_input}', '<label style="width: 10px;"  class="layui-form-label"><i onclick="show_param(\'' + josn_value.id + '\',this)" class="code-show layui-icon layui-icon-tips"></i></label>');} else {input_modules_html=input_modules_html.replaceAll('{_label_input}', '<label  class="layui-form-label">' + modules_value.label + '  <i onclick="show_param(\'' + josn_value.id + '\',this)" class="code-show layui-icon layui-icon-tips"></i></label>');}tmp_html=tmp_html + input_modules_html;});tmp_html=html_begin + tmp_html + html_end;tmp_html=tmp_html.replaceAll('{_label_name}', josn_value.name);tmp_html=tmp_html.replaceAll('{_mid_placeholder}', josn_value.placeholder);tmp_html=tmp_html.replaceAll('{_class}', josn_value.class);if (typeof modelesall[long][josn_value.id]=='undefined') {var show=josn_value.show;if (show==0) show=1;var new_tmp_html='';for (var ii=0; ii < show; ii++) {new_tmp_html=new_tmp_html + tmp_html;}} else {var mysafe_json=modelesall[long][josn_value.id];var oi=0;var new_tmp_html='';var key=Object.keys(mysafe_json);var run=mysafe_json[key[0]].length;for (var i=0; i < run; i++) {var tmp=tmp_html;for (var param in mysafe_json) {tmp=tmp.replaceAll('{mysafe_' + param + "}", mysafe_json[param][i]);var new_id=randomString();tmp=tmp.replaceAll('{select_' + param + "}", new_id);tmp=tmp.replaceAll('{select_js_html_' + param + "}", "<script>select_set_text('" + new_id + "', '" + mysafe_json[param][i] + "');</" + "script>");};new_tmp_html=new_tmp_html + tmp;};};new_tmp_html=new_tmp_html.replace(/{mysafe_(.*?)}/g, "");new_tmp_html=new_tmp_html.replace(/{select_js_html_(.*?)}/g, "");var show_add_bin=josn_value.show_add_bin;var show_add_bin_htm='';if (show_add_bin==true) {show_add_bin_htm="<i class='layui-icon-addition add-list layui-icon'></i>";}if (index==0) {$(".layui-tab-content-" + long).append("<div data-id='" + josn_value.id + "' class='hdsyscms-form-box-" + long + " layui-tab-item layui-tab-item-param layui-icon layui-show' >" + show_add_bin_htm + new_tmp_html + "</div>");} else {$(".layui-tab-content-" + long).append("<div data-id='" + josn_value.id + "' class='hdsyscms-form-box-" + long + " layui-tab-item layui-tab-item-param  layui-icon' >" + show_add_bin_htm + new_tmp_html + "</div>");}});$(".safeparam-" + long).show();layui.form.render();form_file();};$(document).on("click", ".add-list", function() {var data=$(this).parent('.layui-tab-item-param').find('.layui-form-item').html();$(this).parent('.layui-tab-item-param').append(html_begin + data + "</div>");form_file();});var uploadInst='';var pid_arr=[];var DemoTree='';var isshow=0;layui.config({base: '<?php echo getcdnurlhost() ?>/admin/'}).use(['form', 'layer', 'dropdown', 'dtree', 'laydate', 'upload', 'element'], function() {var admin=layui.admin,$=layui.$,form=layui.form,dtree=layui.dtree,upload=layui.upload,dropdown=layui.dropdown,router=layui.router(),laydate=layui.laydate,element=layui.element;;element.render();dropdown.render({elem: '.button-simges-graph',trigger: 'contextmenu',data: [{title: '原图上传',id: 0}, {title: '720宽高自动 (默认)',id: 720}, {title: '960宽高自动 ',id: 960}, {title: '1200宽高自动',id: 1200}, {title: '1980宽高自动',id: 1980}],click: function(obj) {uploadInst_graph.reload({url: 'index.php?m=manage&c=UpFile&a=up_ajax&dir=image&newwidth=' + obj.id});$('#simges-graph-bin-up').click();}});dropdown.render({elem: '.button-simges-album',trigger: 'contextmenu',data: [{title: '原图上传',id: 0}, {title: '720宽高自动 ',id: 720}, {title: '960宽高自动 ',id: 960}, {title: '1200宽高自动 (默认)',id: 1200}, {title: '1980宽高自动',id: 1980}],click: function(obj) {uploadInst_album.reload({url: 'index.php?m=manage&c=UpFile&a=up_ajax&dir=image&newwidth=' + obj.id});$('#simges-album-bin-up').click();}});var uploadInst=upload.render({elem: '#setimges-up',url: 'index.php?m=manage&c=UpFile&a=up_ajax&dir=image&newwidth=0',accept: 'file',field: 'imgFile',auto: true,choose: function(obj) {},before: function(obj) {layer.load(0);},done: function(res) {layer.closeAll();if (res.code==1) {$("#input_" + res.div_id).val(res.url);layer.msg('上传成功');} else {layer.msg(res.msg);}},error: function() {layer.closeAll();layer.alert('上传失败');}});$(document).on("click", ".button-file", function() {var div_id=randomString();$(this).attr('data-id', div_id);$(this).siblings("input").attr('id', "input_" + div_id);uploadInst.reload({url: 'index.php?m=manage&c=UpFile&a=up_ajax&dir=image&newwidth=0&div_id=' + div_id});$('#setimges-up').click();});form.on('select(bin_select_input)', function(data) {$(this).parents().parents().siblings(".select-input").val(data.value);});window.form_file=function() {dropdown.render({elem: '.button-file',trigger: 'contextmenu',show: false,data: [{title: '图片原尺寸上传',id: 0,base64: '0'},{title: '图片720宽高自动',id: 720,base64: '0'}, {title: '图片960宽高自动 ',id: 960,base64: '0'}, {title: '图片1200宽高自动',id: 1200,base64: '0'}, {title: '图片1980宽高自动',id: 1980,base64: '0'}],click: function(obj) {var div_id=randomString();$(this.elem).attr('data-id', div_id);$(this.elem).siblings("input").attr('id', "input_" + div_id);uploadInst.reload({url: 'index.php?m=manage&c=UpFile&a=up_ajax&dir=image&newwidth=' + obj.id + '&div_id=' + div_id});$('#setimges-up').click();}});};if (typeof content_editormd=='undefined' && typeof editormd_app=='function') {window.content_editormd=editormd_app("content-editormd", '');}if (typeof econtent_editormd=='undefined' && typeof editormd_app=='function') {window.econtent_editormd=editormd_app("econtent-editormd", '');}form.on('select(template)', function(data) {if (data.value=='jmp') {$(".hdsys-content").hide();$(".hdsys-jmp").show();} else {$(".hdsys-content").show();$(".hdsys-jmp").hide();}get_form_modeles(data.value);});window.get_form_modeles=function(value) {layer.load();var postdata='templates=zh&relation=' + value;$.ajax({type: "post",url: 'index.php?m=manage&c=<?php echo set_get('c'); ?>&a=get_form_modeles',data: postdata,dataType: "json",success: function(ret) {layer.closeAll('loading');if (ret.data.length > 0) {form_input_html(ret.data, 'zh');}}});layer.load();var postdata='templates=en&relation=' + value;$.ajax({type: "post",url: 'index.php?m=manage&c=<?php echo set_get('c'); ?>&a=get_form_modeles',data: postdata,dataType: "json",success: function(ret) {layer.closeAll('loading');if (ret.data.length > 0) {form_input_html(ret.data, 'en');}}});};DemoTree=dtree.render({elem: "#seltree",width: "100%",url: "index.php?m=manage&c=Category&a=list_ajax&pid_arr=<?php echo $param_db_array_value['pid'] ?>",done: function(res, $ul, first) {},checkbar: true,checkbarType: "self",line: true,skin: "zdy",initLevel: 5,none: "暂时没有栏目，请先去添加栏目",ficon: ["-1", "-1", "-1"],icon: ["-1"]});dtree.on("node('seltree')", function(obj) {DemoTree.clickNodeCheckbar(obj.param.nodeId);});dtree.on("chooseDone('seltree')", function(obj) {let arr=dtree.getCheckbarNodesParam(DemoTree);if (arr.length==1) {select_set_text('template', arr[0].basicData);form.render();}});$(document.body).on("click", ".delete", function() {$(this).parents('.imgdel').remove();});var uploadInst_album=upload.render({elem: '#simges-album-bin-up',url: 'index.php?m=manage&c=UpFile&a=up_ajax&dir=image',accept: 'images',field: 'imgFile',auto: true,before: function(obj) {layer.load(0);},done: function(res) {layer.closeAll();if (res.code==-1) {return layer.msg(res.msg);}$('#simges-album-img-list').append('<div class="hdsys—upload-img-div imgdel"><img src="' + res.url + '" data-url="' + res.url + '"  id="simges-album-img" alt="图集" class="hdsys—upload-img album"> <i class="layui-icon delete">&#xe640;</i></div>');},error: function() {layer.closeAll();layer.alert('上传失败')}});$(document).on('click', "#simges-album-bin", function(e) {uploadInst_album.reload({url: 'index.php?m=manage&c=UpFile&a=up_ajax&dir=image&newwidth=1200'});$('#simges-album-bin-up').click();});var uploadInst_graph=upload.render({elem: '#simges-graph-bin-up',url: 'index.php?m=manage&c=UpFile&a=up_ajax&dir=image',accept: 'images',field: 'imgFile',auto: true,before: function(obj) {layer.load(0);},done: function(res) {layer.closeAll();if (res.code==-1) {return layer.msg(res.msg);}$('#simges-graph-img-list').html('<div class="hdsys—upload-img-div imgdel"><img src="' + res.url + '" data-url="' + res.url + '"   class="hdsys—upload-img"> <i class="layui-icon delete">&#xe640;</i></div>');$("#graph").val(res.url);},error: function() {layer.closeAll();layer.alert('上传失败')}});$(document).on('click', "#simges-graph-bin", function(e) {uploadInst_graph.reload({url: 'index.php?m=manage&c=UpFile&a=up_ajax&dir=image&newwidth=720'});$('#simges-graph-bin-up').click();});form.on('submit(post)', function(data) {pid_arr=[];let arr=dtree.getCheckbarNodesParam(DemoTree);if (arr.length==0) {layer.msg('请先添加分配到栏目');return false;}for (let i=0; i < arr.length; i++) {pid_arr=pid_arr + arr[i].nodeId;if (i + 1 !=arr.length) {pid_arr=pid_arr + ',';}}data=data.field;if (typeof editor_content=='undefined') {data.markdown=content_editormd.getMarkdown();data.emarkdown=econtent_editormd.getMarkdown();data.content=content_editormd.getPreviewedHTML();data.econtent=econtent_editormd.getPreviewedHTML();} else {data.content=editor_content.html();data.econtent=editor_econtent.html();}var album='';$(".album").each(function(ii, vv) {album=album + $(this).attr('data-url') + '|';});var modules_zh={};$(".hdsyscms-form-box-zh").each(function(item, index) {var div_id=$(this).attr("data-id");modules_zh[div_id]={};$(this).find(".hdsyscms-input").each(function(vv, ii) {var name=$(ii).attr('name');name=name.replace("hdsyscms_mysafe_", "");var val=$(ii).val();if (name !='undefined') {if (typeof modules_zh[div_id][name]=='undefined') {modules_zh[div_id][name]=[];};modules_zh[div_id][name].push(val);};});});var modules_en={};$(".hdsyscms-form-box-en").each(function(item, index) {var div_id=$(this).attr("data-id");modules_en[div_id]={};$(this).find(".hdsyscms-input").each(function(vv, ii) {var name=$(ii).attr('name');name=name.replace("hdsyscms_mysafe_", "");var val=$(ii).val();if (name !='undefined') {if (typeof modules_en[div_id][name]=='undefined') {modules_en[div_id][name]=[];};modules_en[div_id][name].push(val);};});});layer.load(1);var data={pid: pid_arr,name: data.name,ename: data.ename,static_url: data.static_url,seokeywords: data.seokeywords,eseokeywords: data.eseokeywords,seodescription: data.seodescription,eseodescription: data.eseodescription,content: data.content,econtent: data.econtent,sdates: data.sdates,url: data.url,eurl: data.eurl,hot: data.hot,addtime: data.addtime,graph: data.graph,template: data.template,album: album,modules: JSON.stringify(modules_zh),emodules: JSON.stringify(modules_en),attribute1: data.attribute1,attribute2: data.attribute2,attribute3: data.attribute3,attribute4: data.attribute4,eattribute1: data.eattribute1,eattribute2: data.eattribute2,eattribute3: data.eattribute3,eattribute4: data.eattribute4,id: data.id,markdown: data.markdown,emarkdown: data.emarkdown,url: data.url,eurl: data.eurl};$.ajax({type: "post",url: 'index.php?m=manage&c=<?php echo set_get('c'); ?>&a=edit_ajax',data: data,dataType: "json",success: function(ret) {layer.closeAll('loading');if (ret.code==1) {layer.confirm(ret.msg, {btn: ['确定完成', '停留继续操作']}, function() {location.href="index.php?m=manage&c=<?php echo set_get('c'); ?>&a=table"});} else {layer.msg(ret.msg);}}});return false;});var isjmp='<?php echo $param_db_array_value['template'] ?>';select_set_text('template', isjmp);if (isjmp=='jmp') {$(".hdsys-jmp").show();}get_form_modeles('<?php echo $param_db_array_value['template'] ?>');form.render();});window.randomString=function() {e=32;var t="ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678",a=t.length,n="";for (i=0; i < e; i++) n +=t.charAt(Math.floor(Math.random() * a));return n};select_set_text('sdates', '<?php echo $param_db_array_value['sdates'] ?>');select_set_text('hot', '<?php echo $param_db_array_value['hot'] ?>');</script>
<?php
if (bs_lib::get_configs_value('personality', 'die')==1) {
echo "
<script src='" . getcdnurlhost() . "/markdown/js/jquery.min.js'></script>
<script src='" . getcdnurlhost() . "/markdown/js/zepto.min.js'></script>
<script src='" . getcdnurlhost() . "/markdown/editormd.min.js'></script>
<script src='" . getcdnurlhost() . "/markdown/app.js'></script>
";
} else {
echo "
<script charset='utf-8' src='" . getcdnurlhost() . "/kindeditor/kindeditor-all-min.js'></script>
<script charset='utf-8' src='" . getcdnurlhost() . "/kindeditor/app.js'></script>";
}
?>
</body>
</html>